package com.atguigu.guli.service.ucenter.controller.admin;

import com.atguigu.guli.service.base.result.R;
import com.atguigu.guli.service.ucenter.service.MemberService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags="会员统计")
@RestController
@RequestMapping("/admin/ucenter/member")
public class AdminMemberController {

    @Autowired
    MemberService memberService;

    @GetMapping("count/{date}")
    public R countRegisterMember(@PathVariable String date){
        Integer num = memberService.countRegisterMember(date);
        return R.ok().data("count",num+"");
    }
}
